-- GENERATED SPELL FOR [Monstrous Plaguebat] --


function spell0_8602(pUnit, Event) --@Sonic Burst,Self--
pUnit:FullCastSpellOnTarget(8281,pUnit)
pUnit:RegisterEvent('Sorts_8602', 6349, 1)
end

function spell1_8602(pUnit, Event) --@Sonic Burst,Self--
pUnit:FullCastSpellOnTarget(64140,pUnit)
pUnit:RegisterEvent('Sorts_8602', 7500, 1)
end

function Sorts_8602(pUnit, Event)
local choix_sorts_8602 = math.random(0, 1)
if choix_sorts_8602 == 0 then
pUnit:RegisterEvent('spell0_8602', 1, 1)
end
if choix_sorts_8602 == 1 then
pUnit:RegisterEvent('spell1_8602', 1, 1)
end
end

function mob8602_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8602', math.random(1500, 3000), 1)
end

function mob8602_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8602_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8602_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8602, 1, 'mob8602_Action')
RegisterUnitEvent(8602, 2, 'mob8602_Leave')
RegisterUnitEvent(8602, 3, 'mob8602_Kill')
RegisterUnitEvent(8602, 4, 'mob8602_Die')
